<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			/*overflow清除*/
			#maincontent{
				border: 1px outset grey;
				overflow: hidden;
			}
			#maincontent div{
				height: 100px;
				width: 100px;
				margin: 4px;
				background-color: gold;
				float: left;
			}
			h2{
				background-color: aqua;
			}
			 
		</style>
	</head>
	<body>
		<div id="maincontent" >
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
			<div>6</div>
			<div>7</div>
			<div>8</div>
			<div>9</div>
		</div>
		<h2>为什么必须要请浮动？盒子塌陷</h2>
	</body>
</html>